<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 800px;
            height: 400px;
            background-color: pink;
            display: flex;
            /*flex的布局中，默认的子元素是不换行的，如果装不开，会缩小子元素的宽度，放到父元素里面*/
            /*flex-wrap: nowrap;*/
            flex-wrap: wrap;
        }
        div span{
            margin: 20px;
            width: 200px;
            height: 100px;
            background-color: skyblue;
        }
    </style>
</head>
<body>
<div>
    <span>1</span>
    <span>2</span>
    <span>3</span>
    <span>4</span>
    <span>5</span>
</div>
</body>
</html>
